﻿using AutoMapper;
using Book.Books;
using Book.CreateUpdate_DTO;
using Book.DTO;

namespace Book
{
    public class BookApplicationAutoMapperProfile : Profile
    {
        public BookApplicationAutoMapperProfile()
        {
            /* You can configure your AutoMapper mapping configuration here.
             * Alternatively, you can split your mapping configurations
             * into multiple profile classes for a better organization. */


            CreateMap<Book, BookDTO>();
            CreateMap<CreateUpdateBookDto, Book>();


            CreateMap<tbCommodityType, tbCommodityTypeDTO>();
            CreateMap<CreateUpdatetbCommodityTypeDto, tbCommodityType>();

            CreateMap<tbImg, tbImgDTO>();
            CreateMap<CreateUpdatetbImgDto, tbImg>();

            CreateMap<User, UserDTO>();
            CreateMap<CreateUpdatetbUserDto, User>();

            CreateMap<tbOrderInfo, tbOrderInfoDTO>();
            CreateMap<CreateUpdatetbOrderInfoDto, tbOrderInfo>();

            CreateMap<tbSaleNum, tbSaleNumDTO>();
            CreateMap<CreateUpdatetbSaleNumDto, tbSaleNum>();
        }
    }
}
